<template>
  <div class="order-calc">
    <div class="title">总金额:</div>
    <div class="account">
      <p>
        <span class="text">商品总价:</span>
        <span class="num">￥{{ +total.price }}</span>
      </p>
      <p v-if="false">
        <span class="text">总积分:</span>
        <span class="num">{{ +total.score }}</span>
      </p>
      <!--<p>
        <span class="text">蜜易券:</span>
        <span class="num">{{ +total.platform_ticket }}</span>
      </p>-->
      <p v-if="true">
        <span class="text">总运费:</span>
        <span class="num" v-if="+total.freight > 0">￥{{ +total.freight }}</span>
        <span class="num" v-else>免运费</span>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  props: ['total'],
  name: 'OrderCalc'
}
</script>

<style scoped lang="stylus">
.order-calc
  margin 10px
  padding 15px 10px
  background white
  border-radius 10px
  .title
    font-weight 700
    text-align left
    padding-bottom 10px
  .account
    p
      height 20px
      display flex
      .text
        width 60px
        text-align right
      .num
        flex 1
        text-align left
        padding-left 5px
        color red
        font-weight 700
</style>
